package com.itheima.demo.demo12;

import java.util.function.Function;

public class LamaStudent {
    public static void main(String[] args) {
        method((s)->{
            Student stu=new Student();
            stu.setName(s);
            return stu;
        });
    }

    private static void method(Function<String,Student>S) {
        Student 牧场 = S.apply("牧场");
        System.out.println(牧场.getName());
    }
}
